import {connect} from "react-redux";
import {addReserveOrder} from "../actions/home";
import ParkLots from "../components/Home/Parklots/index";
import {reserve} from "../apis/parkLotApi";

const mapDispatchToProps = (dispacth) => ({
    addReserveOrder: async data => {
        const createdData = await reserve(data);
        dispacth(addReserveOrder(createdData));
    }
});
const ReserveContainer = connect(null, mapDispatchToProps)(ParkLots);

export default ReserveContainer;